
    <style>
        .table_head_ul li{
            float: left;
            width: 25%;
        }
        .table_head_ul{
            height: 39px;
        }
        .table_ul li{
            float: left;
            width: 25%;
            background: #f9f9f9;
        }
        .table_ul{
            height: 39px;
        }
    </style>
    <div class='fixed hwrap'>
		<a href='javascript:history.back(-1);' target='_parent' class='rel'>
			<i class='icon-angle-left'></i>
		</a>
		<a href='javascript:;' target='_parent'></a>
		<h3 class='dyc'>账户记录</h3>
	</div>
	<div style='height:45px;'></div>
	<div class="recom" style="height:aout">
        <ul class="wrap table_head_ul">
            <li>订单编号</li>
            <li>状态</li>
            <li>变化金额</li>
            <li>时间</li>
        </ul>
        <?php if($list):?>
        <div id="wrap">
            <?php foreach($list as $key => $value):?>
                <ul class="table_ul">
                    <li><?=$value['order_no']?></li>
                    <li><?=$value['type']?></li>
                    <li><?=$value['money']?></li>
                    <li><?=$value['create_time']?></li>
                </ul>
            <?php endforeach;?>
        </div>
        <div id="loading" class="loading hide">正在加载....</div>
        <div style="height:45px;"></div>
       <?php else:?>
           <div class="trans_body cF" style="text-align:center;">还没有记录哦！</div>
      <?php endif;?>
    </div>


<script>
var page = 2;
$(window).scroll(function() {
	timer=null;
	if($(document).scrollTop() >= $(document).height() - $(window).height()){
		 $('#loading').show();
		 window.clearTimeout(timer);
		 $.post("/user/userbill",{page:page},function(rs){
			if(rs.code == 0){
				if(rs.data.max_page < page){
					$('#loading').text("亲，没有更多了！").show();
					timer=window.setTimeout('$("#loading").fadeOut()',1200);
				}else{
					var html = "";
					var list = rs.data.list;
					for(var i = 0; i<list.length;i++){
						html += '<ul class="table_ul">';
                        html += '    <li>' + list[i].order_no + '</li>';
                        html += '    <li>' + list[i].type + '</li>';
                        html += '    <li>' + list[i].money + '</li>';
                        html += '    <li>' + list[i].create_time + '</li>';
                        html += '</ul>';
					}
					$("#wrap").append(html);
					var i = 0 ;
					var t=window.setInterval(function(){
						i++;
						if(i>5){
							i=0;
							window.clearInterval(t);
						}
					},350);
					$('#loading').hide();
					page++;
				}
			}else{
				layer.msg(rs.msg);
			}
		},"json");
	}
});
</script>

<?php include_once __DIR__.'/../inc/foot.html';?>
